-- GENERATED SPELL FOR [Iceblood Warmaster] --


function spell0_14773(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(22911,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14773', 2343, 1)
end

function spell1_14773(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14773', 606, 1)
end

function spell2_14773(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(23511,pUnit)
pUnit:RegisterEvent('Sorts_14773', 30305, 1)
end

function spell3_14773(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_14773', 571, 1)
end

function spell4_14773(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_14773', 567, 1)
end

function spell5_14773(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_14773', 2000, 1)
end

function Sorts_14773(pUnit, Event)
local choix_sorts_14773 = math.random(0, 5)
if choix_sorts_14773 == 0 then
pUnit:RegisterEvent('spell0_14773', 1, 1)
end
if choix_sorts_14773 == 1 then
pUnit:RegisterEvent('spell1_14773', 1, 1)
end
if choix_sorts_14773 == 2 then
pUnit:RegisterEvent('spell2_14773', 1, 1)
end
if choix_sorts_14773 == 3 then
pUnit:RegisterEvent('spell3_14773', 1, 1)
end
if choix_sorts_14773 == 4 then
pUnit:RegisterEvent('spell4_14773', 1, 1)
end
if choix_sorts_14773 == 5 then
pUnit:RegisterEvent('spell5_14773', 1, 1)
end
end

function mob14773_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14773', math.random(1500, 3000), 1)
end

function mob14773_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14773_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14773_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14773, 1, 'mob14773_Action')
RegisterUnitEvent(14773, 2, 'mob14773_Leave')
RegisterUnitEvent(14773, 3, 'mob14773_Kill')
RegisterUnitEvent(14773, 4, 'mob14773_Die')
